Repository navigation
feat(chat): show ! commands as a terminal-style card - #385
Conversation
| <ToolCallBlock block={block} result={result} /> | ||
| <div data-selection-scope="message" tabIndex={-1} className={`shell-run${failed ? " shell-run-failed" : ""}${expanded ? " shell-run-open" : ""}`}> | ||
| <Collapsible open={expanded} onOpenChange={setExpanded}> | ||
| <CollapsibleTrigger className="shell-run-header" disabled={isPending}> |
There was a problem hiding this comment.
The PR description promises "while the command runs the header is disabled." The header has disabled={isPending}, sure — but the real gate is the !isPending guard on the output panel at MessageView.tsx:1921. So a running command is not un-toggleable; it just toggles a Collapsible that renders nothing. The new test at MessageView.test.mjs:1076-1079 even "verifies" this and calls it a pass. That's testing the symptom, not the behavior — if the !isPending guard ever disappears, the header stays clickable and a spinner starts spitting empty output into the pane mid-run. The disabled prop is doing decorative work while the actual protection lives in a sibling ternary.
Fix: Move the toggle lock to the source of truth. Either gate onOpenChange so clicks while pending are no-ops, or drop the !isPending render guard and rely on the disabled trigger — but pick one. Then tighten the test to assert the click handler is a no-op (aria-disabled / pointer-events), not merely that the panel is absent.
Severity: suggestion
There was a problem hiding this comment.
Fixed in d82b53f: the trigger is the only lock now (dropped the !isPending render guard). The test asserts the trigger is aria-disabled and that a click leaves aria-expanded=false; removing disabled={isPending} makes it fail. (Base UI's Collapsible trigger sets aria-disabled, not the native attribute, so the CSS cursor rule now targets that.)
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this incremental change is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. This round correctly makes prompts survive unmount during startup while still skipping observer/setup and rejecting only when the chat stays mounted and the connection fails. Tests and docs line up nicely. Files Reviewed (3 files)
Previous Review Summaries (9 snapshots, latest commit fc46656)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit fc46656)Verdict: No Issues Found | Recommendation: Merge Oh wait, this incremental change is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. This round is a 4-line defensive patch to test teardown, and it gets the race condition right on the first try: retry the cmdline read once, then assert instead of silently skipping. The Files Reviewed (1 file)
Previous review (commit f716418)Verdict: No Issues Found | Recommendation: Merge Oh wait, this incremental change is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. This round is a 4-line defensive patch to test teardown, and it gets the race condition right on the first try: retry the cmdline read once, then assert instead of silently skipping. The Files Reviewed (1 file)
Previous review (commit 3f88311)Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (2 files)
Previous review (commit a31cba4)Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (9 files)
Previous review (commit 3dc1ee9)Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (4 files)
Previous review (commit aa4f276)This review did not finish. The model reached its output limit before it Previous review (commit aa4f276)Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (8 files)
Previous review (commit d82b53f)Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (4 files)
Previous review (commit b24c34a)Verdict: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)
🏆 Best part: The card itself is clean. Reusing the existing 💀 Worst part: The one finding is a real design smell, not a nitpick. The PR description explicitly promises "while the command runs the header is disabled," but the 📊 Overall: Like a Swiss Army knife where one of the blades is held in place by the wrong spring — mostly impressive, but check which tool is actually doing the work before you trust it. Files Reviewed (9 files)
Reviewed by free · Input: 20.4K · Output: 2.1K · Cached: 108.5K |
|
Windows failed again after all 2449 tests passed: the existing host-update-e2e.test.mjs after hook removed a directory before its child processes released it (EBUSY). The cleanup repair is isolated for review in #387 and included here as commit 46351e8 so this head can exercise it in CI. No shell-card implementation changes. Combined local verification: 2478 pass, 12 skip, 0 fail; typecheck and ESLint pass. Windows verification is pending. |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@coderabbitai review |
Action performed
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a31cba464d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (existsSync(hostPids)) for (const pid of readFileSync(hostPids, "utf8").split("\n")) pids.add(Number(pid)); | ||
| for (const pid of pids) { | ||
| if (owned.has(pid) || !Number.isSafeInteger(pid) || pid <= 1 || pid === process.pid || !alive(pid)) continue; | ||
| const identity = await processStartIdentity(pid); | ||
| if (identity) owned.set(pid, identity); |
There was a problem hiding this comment.
Record start identities before adopting detached process PIDs
If a child exits and its PID is reused before the first successful identity sample, this collector adopts the unrelated process as test-owned. The rollback fixture makes that window concrete: it records its PID and immediately calls process.exit(4) (update-fixture.test-helper.mjs:31–37), while collection happens between polling waits. Once the replacement process's identity is stored in owned, the teardown's identity comparison passes and sends that unrelated process SIGTERM. Record each child's start identity alongside its PID while the child is alive, then adopt only a matching pair; sampling an identity after reading a stale PID cannot establish ownership.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
|
@coderabbitai review |
Action not completed
|
|
@coderabbitai review |
Action not completed
|
f716418 to
fc46656
Compare
A ! run reused the agent's tool-call row, so it was hard to tell from what the agent ran. It now has its own card: a $ command prompt line, the output in a mono panel, exit N / cancelled on failure and a local tag for !! runs.
Kilo review: the output panel also checked isPending, so the disabled trigger was never what kept a running card shut. Drop that guard and test the trigger itself (aria-disabled, click leaves it closed).
CodeRabbit review: two untimed runs of the same command on different branches kept the expansion of the previous one. Reset it when the entry id changes too.
|
The user approved both merges. Cleanup PR #387 is now merged as 854c7c3. This branch is rebased onto it with the already-landed cleanup commits removed; the remaining diff is shell-card UI, translations, tests, release note and graph only. The cleanup test is byte-identical to main. Local full suite: 2503 pass, 12 skip, 0 fail; typecheck passed. Awaiting this head’s CI, then merging with its SHA pinned. |
fc46656 to
bc4e110
Compare
Problem
A
!command you ran rendered through the agent's tool-call row (✓ >_ bash …), so it was hard to tell your own commands from the agent's.Change
BashExecutionView(components/MessageView.tsx) now renders its own card instead of wrappingToolCallBlock:$ <command>in mono with an accent$; alocaltag for!!runs; at the right a spinner while it runs, a check on success, or an alert withexit N/cancelledon failure..shell-run*inapp/globals.css), with an inset focus ring and the accessible touch-target height. New strings in en, ja and zh-CN.getToolCategory's "(local)" suffix handling, which only existed for the old synthesizedbash (local)row.ANSI colours are not part of this: omp strips them from bash output (
sanitizeText→Bun.stripANSI) and runs RPC bash withNO_COLOR=1, so there is nothing to render.Verification
MessageViewtest: prompt line, output, toggle open and closed,exit 1,cancelled,localtag (and its absence), pending spinner with no empty panel. It fails against the old view.bun run typecheck, fullbun test --parallel --timeout 30000(2476 pass).Summary by CodeRabbit